function initAsideBar() {
    const asideBar = document.getElementById("aside-navbar");
    const toggleBtn = document.getElementById("toggle-control");
    const backtopBtn = document.getElementById("back-top");
    toggleBtn.onclick = function () {
        asideBar.style.right = (toggleBtn.className === "opend") ? "-5%" : "0px";
        setTimeout(function () {
            toggleBtn.innerText = (toggleBtn.className === "opend") ? "<<" : ">>";
            toggleBtn.className = (toggleBtn.className === "opend") ? "closed" : "opend";
        }, 200);
    }

    backtopBtn.onclick = function () {
        window.location.href = "#top";
    }
}

function nothing() {
    alert("暂未开通");
}

function goCart() {
    window.location.href = "./cart.html";
}